package TouristManagement;

/**
 * Enum definition : Advice
 *
 * @author OpenORB Compiler
*/
public final class Advice implements org.omg.CORBA.portable.IDLEntity
{
    /**
     * Enum member NotInteresting value 
     */
    public static final int _NotInteresting = 0;

    /**
     * Enum member NotInteresting
     */
    public static final Advice NotInteresting = new Advice(_NotInteresting);

    /**
     * Enum member Marginal value 
     */
    public static final int _Marginal = 1;

    /**
     * Enum member Marginal
     */
    public static final Advice Marginal = new Advice(_Marginal);

    /**
     * Enum member Interesting value 
     */
    public static final int _Interesting = 2;

    /**
     * Enum member Interesting
     */
    public static final Advice Interesting = new Advice(_Interesting);

    /**
     * Enum member Worthly value 
     */
    public static final int _Worthly = 3;

    /**
     * Enum member Worthly
     */
    public static final Advice Worthly = new Advice(_Worthly);

    /**
     * Enum member MustVisit value 
     */
    public static final int _MustVisit = 4;

    /**
     * Enum member MustVisit
     */
    public static final Advice MustVisit = new Advice(_MustVisit);

    /**
     * Internal member value 
     */
    private final int _Advice_value;

    /**
     * Private constructor
     * @param  the enum value for this new member
     */
    private Advice( final int value )
    {
        _Advice_value = value;
    }

    /**
     * Maintains singleton property for serialized enums.
     * Issue 4271: IDL/Java issue, Mapping for IDL enum.
     */
    public java.lang.Object readResolve() throws java.io.ObjectStreamException
    {
        return from_int( value() );
    }

    /**
     * Return the internal member value
     * @return the member value
     */
    public int value()
    {
        return _Advice_value;
    }

    /**
     * Return a enum member from its value
     * @param  an enum value
     * @return an enum member
         */
    public static Advice from_int(int value)
    {
        switch (value)
        {
        case 0 :
            return NotInteresting;
        case 1 :
            return Marginal;
        case 2 :
            return Interesting;
        case 3 :
            return Worthly;
        case 4 :
            return MustVisit;
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

    /**
     * Return a string representation
     * @return a string representation of the enumeration
     */
    public java.lang.String toString()
    {
        switch (_Advice_value)
        {
        case 0 :
            return "NotInteresting";
        case 1 :
            return "Marginal";
        case 2 :
            return "Interesting";
        case 3 :
            return "Worthly";
        case 4 :
            return "MustVisit";
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

}
